<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

     <script type="text/javascript" src="/static/lib/jquery-easyui-1.7.0/jquery.min.js"></script>
    <script type="text/javascript" src="/static/lib/jquery-easyui-1.7.0/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/lib/jquery-easyui-1.7.0/locale/easyui-lang-en.js"></script>

    <link type="text/css" rel="styleSheet"  href="/static/lib/jquery-easyui-1.7.0/themes/default/easyui.css" />

</head>
<body>
<form action="/dologin/" method="post" id="loginForm">
    <div style="font-size: 20px;color: red;">{{ msg }}</div>
    <p>
        <label>用户名：<input type="text" name="username"></label>
    </p>

    <p>
        <label >密&emsp;码：<input type="password" name="password"></label>
    </p>

    <p>
        <lable><a href="#" id="btn" class="easyui-linkbutton" data-options="iconCls:'icon-save'">登录</a></lable>
    </p>
</form>

<script>
    $('#btn').linkbutton({
        iconCls: 'icon-search',
        onClick:function () {
            $('#loginForm').form('submit', {
                url:'/dologin/',
                onSubmit: function(param){

                },
                success: function(data){
                    if(JSON.parse(data).success){
                        window.location.href = '/index/'
                    }
                }
            });
        }
    });
</script>

</body>
</html>